#include"ros/ros.h"
#include"turtlesim/Pose.h"
void doma(const turtlesim::Pose::ConstPtr &p)
{  
    ROS_INFO("pose的位置：坐标（%.2f,%.2f),朝向（%.2f),线速度(%.2f)，角速度（%.2f)",p->x,p->y,p->theta,p->linear_velocity,p->angular_velocity);

}
int main(int argc, char *argv[])
{
    setlocale(LC_ALL,"");
    ros::init(argc,argv,"jiejie");
    ros::NodeHandle nh;
    ros::Subscriber sub=nh.subscribe("/turtle1/pose",10,doma);
    ros::spin();

    return 0;
}
